package com.tcm.order.domain.vo;

import com.base.core.lang.DateUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 
 * @Description:订单
 * @author biuco
 * 2020年3月8日下午4:07:01
 *
 */

public class OrderAdminListVo implements Serializable {

	private static final long serialVersionUID = -1502505888265346945L;

	private Long id;

	private String orderSn;

	private String addressConsignee;

	private String doctor;

	private String prescription;

	private Long storeId;

	private Long store;

	private BigDecimal drugMoney;

	private Byte quantity;

	private Byte orderStatus;

	private LocalDateTime createTime;

	private Boolean hasExpired;

	private String leftTime;

	private BigDecimal totalMoney;

	public Long getId() {
		return id;
	}

	public Long getStoreId() {
		return storeId;
	}

	public String getAddressConsignee() {
		return addressConsignee;
	}

	public String getOrderSn() {
		return orderSn;
	}

	public void setAddressConsignee(String addressConsignee) {
		this.addressConsignee = addressConsignee;
	}

	public void setPrescription(String prescription) {
		this.prescription = prescription;
	}

	public String getPrescription() {
		return prescription;
	}

	public BigDecimal getDrugMoney() {
		return drugMoney;
	}

	public void setDrugMoney(BigDecimal drugMoney) {
		this.drugMoney = drugMoney;
	}

	public int getQuantity() {
		return quantity;
	}

	public void setDoctor(String doctor) {
		this.doctor = doctor;
	}

	public String getDoctor() {
		return doctor;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setOrderSn(String orderSn) {
		this.orderSn = orderSn;
	}


	public void setStoreId(Long storeId) {
		this.storeId = storeId;
	}

	public Long getStore() {
		return store;
	}

	public void setQuantity(Byte quantity) {
		this.quantity = quantity;
	}

	public void setStore(Long store) {
		this.store = store;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}


	public Byte getOrderStatus() {
		return orderStatus;
	}


	public LocalDateTime getCreateTime() {
		return createTime;
	}


	public String getLeftTime() {
		return leftTime;
	}


	public void setHasExpired(Boolean hasExpired) {
		this.hasExpired = hasExpired;
	}

	public void setLeftTime(String leftTime) {
		this.leftTime = leftTime;
	}

	public void setOrderStatus(Byte orderStatus) {
		this.orderStatus = orderStatus;
	}

	public BigDecimal getTotalMoney() {
		return totalMoney;
	}

	public void setTotalMoney(BigDecimal totalMoney) {
		this.totalMoney = totalMoney;
	}

	public Boolean getHasExpired() {
		if(this.hasExpired == null){
			this.hasExpired = DateUtils.compare(this.getCreateTime().toString(), DateUtils.getTheDayBeforeNow(30).toString()) > 1;
		}
		return hasExpired;
	}

}
